<template>
  <div class="container-cart">
    <div class="group-list-product">
      <itemCart />
    </div>
    <van-submit-bar class="item-submit-bar" :price="price_total" button-text="提交订单" @submit="onSubmit">
      <van-checkbox v-model="checked" class="item-all-checked" checked-color="#D63A54">全选</van-checkbox>
    </van-submit-bar>
    <!-- 导航栏 -->
    <itemTabbar now-page="2" />
  </div>
</template>

<script>
// api
import {} from '@/api/miva'
// item
import itemCart from '@/components/miva-item/item-list-cart'
import itemTabbar from '@/components/miva-item/item-tabbar'

export default {
  components: { itemCart, itemTabbar },
  data() {
    return {
      checked: true,
      value: 1,
      price_total: 7489,
      submitData: {}
    }
  },
  methods: {
    async onSubmit() {
      console.log('购物车提交订单-log', this.submitData)
    }
  }
}
</script>

<style lang="less">
.container-cart {
  .group {
    &-list-product {
      height: calc(100vh - 45px - 50px - 50px);
      overflow-y: scroll;
    }
  }
  .item {
    &-submit-bar {
      bottom: 50px;
    }
    &-all-checked {
      padding-left: 12px;
    }
  }
  .van-button--danger {
    color: #fff;
    background-color: #d63a54;
    border: 1px solid #d63a54;
  }
  .van-submit-bar__price {
    color: #d63a54;
    font-size: 14px;
  }
}
</style>
